package com.flyme.module.base.client.api;

import com.flyme.common.core.model.ResultBody;
import com.flyme.module.base.client.entity.SysExamtype;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RequestMapping("/sysExamType/")
public interface SysExamtypeRemoteService {

    /**
     * 获取考试分类2
     */
    @PostMapping(value="/selectTypeList")
    ResultBody selectTypeList();

    /**
     * 获取考试分类
     */
    @PostMapping(value="/selectTreeData")
    ResultBody<List<SysExamtype>> selectTreeData(@RequestParam(value = "title",required=false) String title);

    /**
     * 获取考试分类
     */
    @PostMapping(value="/selectTreeData2")
    ResultBody<List<SysExamtype>> selectTreeData2(@RequestParam(value = "title",required=false) String title);

    /**
     * 添加考试分类
     * @param examType
     * @return
     */
    @PostMapping(value="/add")
    ResultBody addExamType(@ModelAttribute(value = "examType") SysExamtype examType);

    /**
     * 更新考试分类
     *
     * @param examType
     * @return
     */
    @PostMapping("/edit")
    ResultBody edit(@ModelAttribute(value = "examType") SysExamtype examType);

    /**
     * 删除考试分类
     *
     * @param examTypeId 分类ID
     * @return
     */
    @PostMapping(value="/delById/{examTypeId}")
    ResultBody delById(@PathVariable Long examTypeId);

    /**
     * 删除考试分类
     */
    @GetMapping(value="/delById2/{id}")
    ResultBody delById2(@PathVariable Long id);

}
